import axios from '@/utils/axios'

// 查询违规记录（不使用分页）
export function queryViolationAPI(data) {
  return axios.post('/api/dor/dor-client/cms/violationRecord/queryViolationRecord', data, {
    headers: {
      'Content-Type': 'application/json'
    }
  })
}

// 根据ID查询违规记录详情
export function queryViolationByIdAPI(id) {
  return axios.post(`/api/dor/dor-client/cms/violationRecord/get?id=${id}`, {}, {
    headers: {
      'Content-Type': 'application/json'
    }
  })
}

// 新增违规记录
export function addViolationAPI(data) {
  return axios.post('/api/dor/dor-client/cms/violationRecord/AddViolationRecord', data, {
    headers: {
      'Content-Type': 'application/json'
    }
  })
}

// 编辑违规记录
export function updateViolationAPI(data) {
  return axios.post('/api/dor/dor-client/cms/violationRecord/updateViolationRecord', data, {
    headers: {
      'Content-Type': 'application/json'
    }
  })
}

// 删除违规记录
export function deleteViolationAPI(id) {
  return axios.post(`/api/dor/dor-client/cms/violationRecord/deleteViolationRecord?id=${id}`, {}, {
    headers: {
      'Content-Type': 'application/json'
    }
  })
}

